package com.iyue.util.security;

import sun.misc.BASE64Encoder;
import java.net.URLEncoder;

public class Base64URLEncoder
{
	public static String encodeUrl(String url) {
		String s = null;
		try {
			BASE64Encoder baseencode = new BASE64Encoder();
			s = baseencode.encodeBuffer(url.getBytes());
			s = URLEncoder.encode(s,"UTF-8");
		} catch (Exception e) {
//			e.printStackTrace();
//			log.error("encodeUrl error!");
		}
		return s;
	}
}